repo: Only use mmap() for metadata > 16k
authorColin Walters <walters@verbum.org>
Thu, 1 Sep 2016 20:09:30 +0000 (16:09 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 8 Sep 2016 14:56:30 +0000 (14:56 +0000)
commite127070550fd22d129cd19b45e0d8c74c1b8cc79
tree7aec868892dd49ca4f8ceeec240ea6467b3b5623
parent8dbb104cdcfaadad8a826eb76fec5f7058c5beb4
repo: Only use mmap() for metadata > 16k

See http://stackoverflow.com/questions/258091/when-should-i-use-mmap-for-file-access
and
https://lwn.net/Articles/591978/

I didn't really notice much performance difference in some small
tests, but I happened to be stracing and realized we were `mmap()`ing
even for 50 bytes which is not very useful, so let's not do it.

Closes: #489
Approved by: alexlarsson
src/libostree/ostree-repo.c